/*Replication Materials for Democratizing the Dispute*/
/*All analysis run using Stata13�*/

use "ReplicationData_DemocratizingTheDispute.dta", replace
xtset claimdy year
****Main Text Tables and Figures****
**Table 1**
**Baseline and Interactive Models (Polity and CHISOLS)**
mlogit attempts i.cp2lag10dem   l10.recyes10 l10.recno10 l10.recmid10 i.icowsalc i.tp2lag10dem i.cp2lag10idem i.cp2lag10auto   c.powershift c.cincdiff  i.jointdem i.jointauto logdistkm, vce(cluster claimdy) 
mlogit attempts i.cp2lag10dem##l10c.recyes10 i.cp2lag10dem##l10c.recno10 i.cp2lag10dem##l10c.recmid10 i.cp2lag10dem##i.icowsalc i.tp2lag10dem i.cp2lag10idem i.cp2lag10auto   c.powershift c.cincdiff  i.jointdem i.jointauto logdistkm, vce(cluster claimdy) 
mlogit attempts  i.chal_chisols_lag10dem##l10c.recyes10 i.chal_chisols_lag10dem##l10c.recno10 i.chal_chisols_lag10dem##l10c.recmid10 i.chal_chisols_lag10dem##i.icowsalc i.tgt_chisols_lag10dem i.cp2lag10idem i.cp2lag10auto   c.powershift c.cincdiff  i.jointdem i.jointauto logdistkm, vce(cluster claimdy)   

 *Table 2**
 **Alternative Models (Three Category DV and CHISOLS Military Model)**
mlogit attempts3 i.chal_chisols_lag10dem##l10c.recyes10 i.chal_chisols_lag10dem##l10c.recno10 i.chal_chisols_lag10dem##l10c.recmid10 i.chal_chisols_lag10dem##i.icowsalc   i.tgt_chisols_lag10dem  i.cp2lag10idem i.cp2lag10auto   c.powershift c.cincdiff  i.jointdem i.jointauto logdistkm, vce(cluster claimdy) 
mlogit attempts  i.chal_chisols_lag10dem_mil##l10c.recyes10 i.chal_chisols_lag10dem_mil##l10c.recno10 i.chal_chisols_lag10dem_mil##l10c.recmid10 i.chal_chisols_lag10dem_mil##i.icowsalc i.tgt_chisols_lag10dem i.cp2lag10idem i.cp2lag10auto   c.powershift c.cincdiff  i.jointdem i.jointauto logdistkm, vce(cluster claimdy)  

**Figure 1** 
**Predictive Margins for Model 2**
set scheme s1mono
mlogit attempts i.cp2lag10dem##i.icowsalc i.cp2lag10dem##l10c.recyes10 i.cp2lag10dem##l10c.recno10 i.cp2lag10dem##l10c.recmid10  i.tp2lag10dem i.cp2lag10idem i.cp2lag10auto   c.powershift c.cincdiff  i.jointdem i.jointauto logdistkm, vce(cluster claimdy) 
margins cp2lag10dem, at(l10.recyes10=(0 1 2 3 4 5)) pr(out(1)) 
marginsplot

*Figure 2**
**Predictive Margins for Model 3**
 set scheme s1mono
 mlogit attempts  i.chal_chisols_lag10dem##l10c.recyes10 i.chal_chisols_lag10dem##l10c.recno10 i.chal_chisols_lag10dem##l10c.recmid10 i.chal_chisols_lag10dem##i.icowsalc i.tgt_chisols_lag10dem i.cp2lag10idem i.cp2lag10auto   c.powershift c.cincdiff  i.jointdem i.jointauto logdistkm, vce(cluster claimdy)   
margins chal_chisols_lag10dem, at(l10.recyes10=(0 1 2 3 4 5)) pr(out(1))
marginsplot 

**Figure 3**
**Predictive Margins for Model 4**
 set scheme s1mono
mlogit attempts3 i.chal_chisols_lag10dem##l10c.recyes10 i.chal_chisols_lag10dem##l10c.recno10 i.chal_chisols_lag10dem##l10c.recmid10 i.chal_chisols_lag10dem##i.icowsalc   i.tgt_chisols_lag10dem  i.cp2lag10idem i.cp2lag10auto   c.powershift c.cincdiff  i.jointdem i.jointauto logdistkm, vce(cluster claimdy) 
margins chal_chisols_lag10dem, at(l10.recyes10=(0 1 2 3 4 5)) pr(out(1)) 
marginsplot 

**Figure 4**
**Predictive Margins for Model 5**
set scheme s1mono
mlogit attempts  i.chal_chisols_lag10dem_mil##l10c.recyes10 i.chal_chisols_lag10dem_mil##l10c.recno10 i.chal_chisols_lag10dem_mil##l10c.recmid10 i.chal_chisols_lag10dem_mil##i.icowsalc i.tgt_chisols_lag10dem i.cp2lag10idem i.cp2lag10auto   c.powershift c.cincdiff  i.jointdem i.jointauto logdistkm, vce(cluster claimdy)  
margins chal_chisols_lag10dem_mil, at(l10.recyes10=(0 1 2 3 4 5)) pr(out(1)) 
marginsplot 




 
**Appendix Tables and Figures***
  
 **Table 1A**
 **Logistic Regression Models with Seperate DVs**
logit attanyp i.cp2lag10dem i.cp2lag10dem##l10c.recyes10 i.cp2lag10dem##l10c.recno10 i.cp2lag10dem##l10c.recmid10 i.cp2lag10dem##i.icowsalc i.tp2lag10dem i.cp2lag10idem i.cp2lag10auto   c.powershift c.cincdiff  i.jointdem i.jointauto logdistkm i.midissyr, vce(cluster claimdy) 
logit midissyr i.cp2lag10dem i.cp2lag10dem##l10c.recyes10 i.cp2lag10dem##l10c.recno10 i.cp2lag10dem##l10c.recmid10 i.cp2lag10dem##i.icowsalc i.tp2lag10dem i.cp2lag10idem i.cp2lag10auto   c.powershift c.cincdiff  i.jointdem i.jointauto logdistkm i.attanyp, vce(cluster claimdy) 
logit attanyp i.chal_chisols_lag10dem i.chal_chisols_lag10dem##l10c.recyes10 i.chal_chisols_lag10dem##l10c.recno10 i.chal_chisols_lag10dem##l10c.recmid10 i.chal_chisols_lag10dem##i.icowsalc i.tgt_chisols_lag10dem i.cp2lag10idem i.cp2lag10auto   c.powershift c.cincdiff  i.jointdem i.jointauto logdistkm i.midissyr, vce(cluster claimdy) 
logit midissyr i.chal_chisols_lag10dem i.chal_chisols_lag10dem##l10c.recyes10 i.chal_chisols_lag10dem##l10c.recno10 i.chal_chisols_lag10dem##l10c.recmid10 i.chal_chisols_lag10dem##i.icowsalc i.tgt_chisols_lag10dem i.cp2lag10idem i.cp2lag10auto   c.powershift c.cincdiff  i.jointdem i.jointauto logdistkm i.attanyp, vce(cluster claimdy) 

 
**Table 2A**
**Cross Tabulation of Democratization and Conflict Management Attempts**
 tab attempts cp2lag10dem, chi  col
 
 **Table 3A**
**Only Democracies and Non-Always Democracy Models*
mlogit attempts i.cp2lag10dem##i.icowsalc  i.cp2lag10dem##l10c.recyes10 i.cp2lag10dem##l10c.recno10 i.cp2lag10dem##l10c.recmid10 i.tp2lag10dem i.cp2lag10idem i.cp2lag10auto   c.powershift c.cincdiff  i.jointdem i.jointauto logdistkm if chalpolity2>6, vce(cluster claimdy) 
mlogit attempts i.cp2lag10dem##i.icowsalc  i.cp2lag10dem##l10c.recyes10 i.cp2lag10dem##l10c.recno10 i.cp2lag10dem##l10c.recmid10 i.tp2lag10dem i.cp2lag10idem i.cp2lag10auto   c.powershift c.cincdiff  i.jointdem i.jointauto logdistkm if alwaysdem==0, vce(cluster claimdy) 

**Table 4A**
**Penalized MLE Models**
firthlogit attanyp  i.cp2lag10dem##c.lag10recyes i.cp2lag10dem##c.lag10recno i.cp2lag10dem##c.lag10recmid i.icowsalc i.tp2lag10dem i.cp2lag10idem i.cp2lag10auto   c.powershift c.cincdiff  i.jointdem i.jointauto logdistkm 
firthlogit midissyr i.cp2lag10dem##i.icowsalc i.cp2lag10dem##c.lag10recyes i.cp2lag10dem##c.lag10recno i.cp2lag10dem##c.lag10recmid i.tp2lag10dem i.cp2lag10idem i.cp2lag10auto   c.powershift c.cincdiff  i.jointdem i.jointauto logdistkm 

**Table 5A**
**Predictive Margins of Challenger Democratization * Previous Peaceful Attempts** 
mlogit attempts i.cp2lag10dem##i.icowsalc i.cp2lag10dem##l10c.recyes10 i.cp2lag10dem##l10c.recno10 i.cp2lag10dem##l10c.recmid10  i.tp2lag10dem i.cp2lag10idem i.cp2lag10auto   c.powershift c.cincdiff  i.jointdem i.jointauto logdistkm, vce(cluster claimdy) 
margins cp2lag10dem, at(l10.recyes10=(0 1 2 3 4 5)) pr(out(1)) saving(file4, replace)
 mlogit attempts  i.chal_chisols_lag10dem##l10c.recyes10 i.chal_chisols_lag10dem##l10c.recno10 i.chal_chisols_lag10dem##l10c.recmid10 i.chal_chisols_lag10dem##i.icowsalc i.tgt_chisols_lag10dem i.cp2lag10idem i.cp2lag10auto   c.powershift c.cincdiff  i.jointdem i.jointauto logdistkm, vce(cluster claimdy)   
margins chal_chisols_lag10dem, at(l10.recyes10=(0 1 2 3 4 5)) pr(out(1)) saving(file4, replace)
 
**Table 6A**
**Mixed Strategy Models**
mlogit attempts3 i.cp2lag10dem##l10c.recyes10 i.cp2lag10dem##l10c.recno10 i.cp2lag10dem##l10c.recmid10 i.cp2lag10dem##i.icowsalc   i.tp2lag10dem i.cp2lag10idem i.cp2lag10auto   c.powershift c.cincdiff  i.jointdem i.jointauto logdistkm, vce(cluster claimdy) 
mlogit attempts3 i.chal_chisols_lag10dem##l10c.recyes10 i.chal_chisols_lag10dem##l10c.recno10 i.chal_chisols_lag10dem##l10c.recmid10 i.chal_chisols_lag10dem##i.icowsalc i.tgt_chisols_lag10dem i.cp2lag10idem i.cp2lag10auto   c.powershift c.cincdiff  i.jointdem i.jointauto logdistkm, vce(cluster claimdy) 

**Table 7A**
**Alternative Specifications (V-Dem and Three Category MID DV Models)
mlogit attempts  i.chalvdemlag10dem##l10c.recyes10 i.chalvdemlag10dem##l10c.recno10 i.chalvdemlag10dem##l10c.recmid10 i.chalvdemlag10dem##i.icowsalc i.tgtvdemlag10dem i.cp2lag10idem i.cp2lag10auto   c.powershift c.cincdiff  i.jointdem i.jointauto logdistkm, vce(cluster claimdy)   
mlogit attempts2 i.cp2lag10dem##l10c.recyes10 i.cp2lag10dem##l10c.recno10 i.cp2lag10dem##l10c.recmid10 i.cp2lag10dem##i.icowsalc   i.tp2lag10dem i.cp2lag10idem i.cp2lag10auto   c.powershift c.cincdiff  i.jointdem i.jointauto logdistkm, vce(cluster claimdy) 

*Table 8A**
**No Salience Models
mlogit attempts i.cp2lag10dem i.cp2lag10dem##l10c.recyes10 i.cp2lag10dem##l10c.recno10 i.cp2lag10dem##l10c.recmid10  i.tp2lag10dem i.cp2lag10idem i.cp2lag10auto   c.powershift c.cincdiff  i.jointdem i.jointauto logdistkm, vce(cluster claimdy) 
mlogit attempts  i.chalvdemlag10dem##l10c.recyes10 i.chalvdemlag10dem##l10c.recno10 i.chalvdemlag10dem##l10c.recmid10  i.tgtvdemlag10dem i.cp2lag10idem i.cp2lag10auto   c.powershift c.cincdiff  i.jointdem i.jointauto logdistkm, vce(cluster claimdy)   
mlogit attempts i.chal_chisols_lag10dem i.chal_chisols_lag10dem##l10c.recyes10 i.chal_chisols_lag10dem##l10c.recno10 i.chal_chisols_lag10dem##l10c.recmid10  i.tgt_chisols_lag10dem i.cp2lag10idem i.cp2lag10auto   c.powershift c.cincdiff  i.jointdem i.jointauto logdistkm, vce(cluster claimdy) 


**Table 9A**
**Alternative Year Specifications**
mlogit attempts  i.chal_chisols_lag3dem##l3c.recyes10 i.chal_chisols_lag3dem##l3c.recno10 i.chal_chisols_lag3dem##l3c.recmid10 i.chal_chisols_lag3dem##i.icowsalc i.tgt_chisols_lag3dem i.cp2lag3idem i.cp2lag3auto   c.powershift c.cincdiff  i.jointdem i.jointauto logdistkm, vce(cluster claimdy)   
mlogit attempts  i.chal_chisols_lag5dem##l5c.recyes10 i.chal_chisols_lag5dem##l5c.recno10 i.chal_chisols_lag5dem##l5c.recmid10 i.chal_chisols_lag5dem##i.icowsalc i.tgt_chisols_lag5dem i.cp2lag5idem i.cp2lag5auto   c.powershift c.cincdiff  i.jointdem i.jointauto logdistkm, vce(cluster claimdy)  
mlogit attempts  i.chal_chisols_lag7dem##l7c.recyes10 i.chal_chisols_lag7dem##l7c.recno10 i.chal_chisols_lag7dem##l7c.recmid10 i.chal_chisols_lag7dem##i.icowsalc i.tgt_chisols_lag7dem i.cp2lag7idem i.cp2lag7auto   c.powershift c.cincdiff  i.jointdem i.jointauto logdistkm, vce(cluster claimdy)    

 
**Figure 1A**
**Predictive Margins for Model 2 (Militarized)**
set scheme s1mono
mlogit attempts i.cp2lag10dem##i.icowsalc i.cp2lag10dem##l10c.recyes10 i.cp2lag10dem##l10c.recno10 i.cp2lag10dem##l10c.recmid10  i.tp2lag10dem i.cp2lag10idem i.cp2lag10auto   c.powershift c.cincdiff  i.jointdem i.jointauto logdistkm, vce(cluster claimdy) 
margins cp2lag10dem, at(l10.recyes10=(0 1 2 3 4 5)) pr(out(2)) 
marginsplot

*Figure 2A**
**Predictive Margins for Model 3 (Militarized)**
 set scheme s1mono
 mlogit attempts  i.chal_chisols_lag10dem##l10c.recyes10 i.chal_chisols_lag10dem##l10c.recno10 i.chal_chisols_lag10dem##l10c.recmid10 i.chal_chisols_lag10dem##i.icowsalc i.tgt_chisols_lag10dem i.cp2lag10idem i.cp2lag10auto   c.powershift c.cincdiff  i.jointdem i.jointauto logdistkm, vce(cluster claimdy)   
margins chal_chisols_lag10dem, at(l10.recyes10=(0 1 2 3 4 5)) pr(out(2)) 
marginsplot 


/*Data Sources used:
ICOW Claims Data - Hensel, Paul R., Sara McLaughlin Mitchell, Thomas E. Sowers II, and Clayton L. Thyne (2008) Bones of Contention: Comparing Territorial, Maritime, and River Issues. Journal of Conflict Resolution 52 (1): 117-43.

Polity IV Democracy Data - Marshall, Monty G., Keith Jaggers, and Ted Robert Gurr (2013) Polity IV Project: Dataset Users� Manual. Arlington: Polity IV Project. 

CHISOLS Democratization Data - Mattes, Michaela, Brett Ashley Leeds, and Naoko Matsumura (2016) Measuring Change in Source of Leader Support: the CHISOLS Dataset. Journal of Peace Research 53 (2): 259-67.

V-Dem Democratization Data - Coppedge, Michael, John Gerring, Carl Henrik Knutsen, Staffan I. Lindberg, Jan Teorell, David Altman, Michael Bernhard, M. Steven Fish, Adam Glynn, Allen Hicken, Anna L�hrmann, Kyle L. Marquardt, Kelly McMann, ///
Pamela Paxton, Daniel Pemstein, Brigitte Seim, Rachel Sigman, Svend-Erik Skaaning, Jeffrey Staton, Steven Wilson, Agnes Cornell, Lisa Gastaldi, Haakon Gjerl�w, Nina Ilchenko, Joshua Krusell, Laura Maxwell, Valeriya Mechkova, Juraj Medzihorsky, ///
Josefine Pernes, Johannes von R�mer, Natalia Stepanova, Aksel Sundstr�m, Eitan Tzelgov, Yi-ting Wang, Tore Wig, and Daniel Ziblatt. 2019. V-Dem [Country-Year/Country-Date] Dataset v9. Varieties of Democracy (V-Dem) Project. https://doi.org/10.23696/vdemcy19

CINC Data - Singer, J. David (1988) Reconstructing the Correlates of War Dataset on Material Capabilities of States, 1816�1985. International Interactions 14 (2): 115-132.

Distance Data - http://ksgleditsch.com/data-5.html
*/



 


